/* 
 * File:   string_algo.h
 * Author: aishwarya
 *
 * Created on March 21, 2011, 12:16 PM
 */

#ifndef STRING_ALGO_H
#define	STRING_ALGO_H

#ifdef	__cplusplus
extern "C" {
#endif

/* Find Nth occurrence of sub in str
 * @args n is the number of occurence seeked
 * @args len is the lenght of substring
 * Returns -1 if nth occurence not found, else returns index in str
 * of the begin of nth occurence of sub
 */
int xsubstr(char *str, char *sub, int n, int len) ;


#ifdef	__cplusplus
}
#endif

#endif	/* STRING_ALGO_H */

